package beanstao.util.type.base;

import java.lang.reflect.Array;

import beanstao.util.Util;
import beanstao.util.exception.technical.util.reflect.FailToCastObjectException;
import beanstao.util.type.Castor;

public class Array2Array extends Castor<Object, Object>
{

	public Array2Array()
	{
		this.fromClass = Array.class;
		this.toClass = Array.class;
	}

	@Override
	public Object cast(Object src, Class<?> toType, String... args) throws FailToCastObjectException
	{
		return Util.array2array(src, toType.getComponentType());
	}

}
